from page.basepage import basepage


class LoginPage(basepage):
    #
    def __init__ (self, driver):
        self.driver = driver

    def get_loginUsername(self):
        return self.getElement("lp_loginUsername")

    def get_loginPassword(self):
        return self.getElement("lp_loginPassword")

    def get_loginButton(self):
        return self.getElement("lp_loginButton")


    def send_username(self,key):
        element=self.get_loginUsername()
        self.clear(element)
        self.send(element,key)


    def send_password(self,key):
        element = self.get_loginPassword ()
        self.clear(element)
        self.send (element, key)


    def click_loginButton(self):
        element=self.get_loginButton()
        self.click(element)



    def Login(self,username,password):
        self.send_username(username)
        self.send_password(password)
        self.click_loginButton()

